<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">


<h:head>
	<title>Creates a new Materiel</title>

</h:head>
<h:body>

	<h:form>
		<p:panelMenu style="width:200px">
			<p:submenu label="Menu">
				<p:menuitem value="New" action="#{materielController.doNew}"
					icon="ui-icon-disk" />
				<p:menuitem value="Home" action="#{materielController.doHi}"
					icon="ui-icon-arrowrefresh-1-w" />
				<p:menuitem value="Delete" action="#{materielController.doDelete}"
					icon="ui-icon-close" />
			</p:submenu>
		</p:panelMenu>
		<p:panel id="panel" header="Nouveau matériel"
			style="margin-bottom:10px;">

			<h:panelGrid columns="2" cellpadding="4">

				<h:outputLabel value="Titre" style="font-weight:bold" />
				<p:inputText id="titre"
					value="#{materielController.materiel.libelle}" />

				<h:outputLabel value="Prix" style="font-weight:bold" />
				<p:inputText id="prix" value="#{materielController.materiel.prix}" />


				<h:outputLabel value="Nature" style="font-weight:bold" />
				<p:inputText id="nature"
					value="#{materielController.materiel.nature}" />

				<h:outputLabel value="Description" style="font-weight:bold" />

				<p:inputTextarea rows="5" cols="30" counter="counter" maxlength="50"
					counterTemplate="{0} caractères restants" autoResize="false"
					value="#{materielController.materiel.description}" />
				<h:outputText id="counter" />

				<h:outputText />



				<h:outputLabel value="Model" style="font-weight:bold" />
				<p:inputText id="model" value="#{materielController.materiel.model}" />

				<h:outputLabel value="Numéro d'inventaire" style="font-weight:bold" />
				<p:inputText id="numInventaire"
					value="#{materielController.materiel.numInventaire}" />

				<h:outputLabel value="Code Barres" style="font-weight:bold" />
				<p:inputText id="codeBarres"
					value="#{materielController.materiel.codeBarres}" />

				<h:outputText value="Etat : " style="font-weight:bold" />
				<p:selectOneMenu value="#{materielController.etatSelectionnee}">
					<f:selectItem itemLabel="Select One" itemValue="" />
					<f:selectItems value="#{materielController.etatList}" />
				</p:selectOneMenu>
				
				<h:outputText value="Fournisseur : " style="font-weight:bold" />
				<p:selectOneMenu value="#{materielController.fournisseurSelectionnee}">
					<f:selectItem itemLabel="Fournisseur" itemValue="" />
					<f:selectItems value="#{materielController.fournisseurList}" />
				</p:selectOneMenu>
			</h:panelGrid>
			<h:panelGrid columns="4" cellpadding="2">

				<h:outputText value="Affectation : " style="font-weight:bold" />
				<p:selectOneMenu
					value="#{materielController.affectationSelectionnee}">
					<f:selectItem itemLabel="Departement" itemValue="" />
					<f:selectItems value="#{materielController.affectationList}" />
				</p:selectOneMenu>
				<p:selectOneMenu value="#{materielController.salleSelectionnee}">
					<f:selectItem itemLabel="Salle" itemValue="" />
					<f:selectItems value="#{materielController.salleList}" />
				</p:selectOneMenu>
				<p:selectOneMenu value="#{materielController.profSelectionnee}">
					<f:selectItem itemLabel="Prof" itemValue="" />
					<f:selectItems value="#{materielController.profList}" />
				</p:selectOneMenu>
				<f:facet name="footer">
					<h:panelGroup style="display:block; text-align:center">
						<p:commandButton value="Envoyer"
							action="#{materielController.doCreateMateriel}" ajax="false" />
					</h:panelGroup>
				</f:facet>
			</h:panelGrid>
		</p:panel>

	</h:form>
	<i>Gestion du parc informatique - (Intégration de JSF 2, Spring 3
		et Hibernate 3)</i>
</h:body>
</html>
<!--
-->